Skip to content

Conversation

@mjtrangoni
Copy link
Contributor

Hi,

Installing the redis-operator via helm today, I've found that the Service and the ServiceMonitor for the redis-operator helm chart was missing. This trivial PR fixes that. I've run helm-docs as well for updating the README.md file.

Thank you!

Fixes NONE

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

  • Tests have been added/modified and all tests pass.
  • Functionality/bugs have been confirmed to be unchanged or fixed.
  • I have performed a self-review of my own code.
  • Documentation has been updated or added where necessary.

Additional Context

Tested with,

helm template template-operator --values custom_value.yaml -n test-namespace . > manifests.yaml
Click to expand custom_value.yaml
redisOperator:
  name: redis-operator
  imageName: quay.io/opstree/redis-operator

  # When not specified, the operator will watch all namespaces. It can be set to a specific namespace or multiple namespaces separated by commas.
  watchNamespace: "infra-oauth2-proxy"
  # If set to true, webhook server will be enabled for masterSlaveAntiAffinity feature
  # When enabled, you need to either:
  # 1. Enable cert-manager (certmanager.enabled=true) for automatic certificate management, or
  # 2. Manually create a certificate secret (see "How to generate private key" section in README)
  webhook: true
  automountServiceAccountToken: true

  # pprof configuration for performance profiling
  pprof:
    # Enable pprof server for performance profiling
    enabled: false

  # metrics configuration for monitoring
  metrics:
    # Enable metrics server
    enabled: true
    # The address the metrics endpoint binds to
    bindAddress: ":8080"
    # Enable ServiceMonitor resource creation for Prometheus Operator
    serviceMonitor:
      enabled: true
      interval: 30s
      scrapeTimeout: 10s
      # Namespace where servicemonitor resource will be created, if empty it
      # will be created in the same namespace as the operator
      namespace: ""
      # -- extraLabels are added to the servicemonitor when enabled set to true
      extraLabels:
        team: infra

resources:
  limits:
    cpu: 500m
    memory: 500Mi
  requests:
    cpu: 500m
    memory: 500Mi

replicas: 1

rbac:
  enabled: true
serviceAccountName: redis-operator

serviceAccount:
  automountServiceAccountToken: true

service:
  name: webhook-service
  namespace: infra-mgmt

certificate:
  name: redis-serving-cert
  secretName: redis-webhook-server-cert

issuer:
  # Whether to create the issuer or not. You might want to disable this if instead you
  # want to use a ClusterIssuer that you simply want to provide.
  create: true
  # You can choose Issuer or ClusterIssuer here. The first one is namespaced, the second one
  # is available for global usage.
  kind: Issuer
  type: selfSigned
  name: redis-operator-issuer
  email: [email protected]
  server: https://acme-v02.api.letsencrypt.org/directory
  privateKeySecretName: letsencrypt-prod
  solver:
    enabled: true
    ingressClass: nginx

certmanager:
  # Whether to use cert-manager for certificate management
  # Only effective when webhook=true
  # If webhook=true and certmanager.enabled=false, you need to manually create certificate secret
  enabled: true
  # API version of the cert-manager CRDs
  apiVersion: "cert-manager.io/v1"

priorityClassName: ""
nodeSelector: {}
tolerateAllTaints: false
tolerations: []
affinity: {}

podSecurityContext: {}
#  fsGroup: 2000

securityContext: {}
#  capabilities:
#    drop:
#    - ALL
#  readOnlyRootFilesystem: true
#  runAsNonRoot: true
#  runAsUser: 1000

# Feature gates for alpha/experimental features
featureGates:
  # Enable generating Redis configuration using an init container instead of a regular container
  GenerateConfigInInitContainer: false

manager:
  # config values for the operator manager
  config:
    kubeClientTimeout: 60s
    # -- If value > 0, it will override the default value in the operator
    kubeClientQPS: 0.0

@mjtrangoni mjtrangoni force-pushed the feature-add-servicemonitor-operator branch 2 times, most recently from 1d6cb60 to ef9d3b7 Compare September 13, 2025 16:28
@mjtrangoni
Copy link
Contributor Author

This is also somehow related to #1537, but here the issue would be already "fixed".

@codecov
Copy link

codecov bot commented Sep 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@2e16943). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1532   +/-   ##
=======================================
  Coverage        ?   31.75%           
=======================================
  Files           ?       79           
  Lines           ?     7121           
  Branches        ?        0           
=======================================
  Hits            ?     2261           
  Misses          ?     4680           
  Partials        ?      180           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mjtrangoni
Copy link
Contributor Author

@drivebyer PTAL at this. I am missing the ServiceMonitor for the operator itself.

@mjtrangoni mjtrangoni force-pushed the feature-add-servicemonitor-operator branch from ef9d3b7 to cc26c56 Compare September 19, 2025 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant